<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <meta name="author" content="Flying hormone" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta charset="UTF-8">
        <link rel="stylesheet" href="../css/media.css" />
        <link rel="stylesheet" href="../css/mui.min.css" />
        <link rel="stylesheet" href="../css/head_foot.css" />
        <script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="../js/jquery.Query.js" ></script>
        <script type="text/javascript" src="../js/jquery-cookie.js"></script>
        <script type="text/javascript" src="../js/mui.min.js"></script>
        <script type="text/javascript" src="../js/appcan.js"></script>
        <script type="text/javascript" src="../js/appcan.control.js"></script>
        <script type="text/javascript" src="../js/common.js" ></script>
        <title>消息列表</title>
        <style>
            
            .xiaoxiliebiao{ font-size: 1em; padding: 0 5%}
            .xiaoxiliebiao li{ border-bottom: 0.05em solid #aaa; line-height: 3em;}
            .tishi_btn{
                border-radius: 50%;
                background: #f34628;
                margin: 1.5em -1.5em;
                position: absolute;
                width: 1em;
                height: 1em;
                font-size: 0.7em;
            }
        </style>
    </head>

    <body>
        <header>
            <a><span class="leftleft"></span></a>
            <h1 id="title">消息列表</h1>
        </header>
        <section class="xiaoxiliebiao">
            <ul id="msgList">
            </ul>
        </section>
        <footer>
            <nav class="mui-bar mui-bar-tab">
                <a href="javascript:;" id="tcIndex">
                    <img src="../img/shouye2.png" />
                    <span class="mui-tab-label">首页</span>
                </a>
                <a href="javascript:;" id="myfabu">
                    <img src="../img/fabu2.png" />
                    <span class="mui-tab-label">发布</span>
                </a>
                <a class="action" href="javascript:;" id="myInfo">
                    <img src="../img/mine2.png" />
                    <span class="mui-tab-label">我的</span>
                </a>
            </nav>
        </footer>
        <script>
            $(function(){
                var msgType = getVal("msgType");
                appcan.ajax({
                    type:"post",
                    url:host+"/getUserMsgList.json?userId="+appcan.locStorage.getVal("userId")+"&msgType="+msgType,
                    dataType:"json",
                    contentType: "application/json",
                    success : function(dataResult){
                        var msgStr = '';
                        if(dataResult.data.length>0){
                            for(var i=0;i<dataResult.data.length;i++){
                                msgStr += '<li><a onclick="openUrl(\'xiaoxixq.html?msgId='+dataResult.data[i].id+'\',\'xiaoxixq\')"><p style="margin-left: 1em;">';
                                if(dataResult.data[i].state==1){
                                     msgStr += '<span class="tishi_btn"></span>';
                                }
                                msgStr += (dataResult.data[i].content||'无消息内容')+'</p></a></li>';
                            }
                        }
                        $("#msgList").html(msgStr);
                    }
                })
            })
        </script>
    </body>

</html>